#include "cilib.h"
#include "stdio.h"

int main()
{
    void* ptr;
    int w,h;
    PIXEL* img;
    int i,j;

    int procDepth=0;
    int error=0;

    char filename[255];
    printf("filename:\n");
    scanf("%s",filename);

    printf("proc depth:\n");
    scanf("%d",&procDepth);
    printf("error:\n");
    scanf("%d",&error);

    ptr=ciLoadBitmap(filename);
    ciGetImageSize(ptr,&w,&h);

    printf("image info:\nwidth=%d,height=%d\n",w,h);

    printf("bitcount=%d\n",ciGetImageBitCount(ptr));

    for(i=0;i<procDepth;++i){
        matrixProcess(ptr,procDepth-i,error);
    }


    ciSaveBitmap(ptr,"out.bmp");
    printf("done!");
    getch();
    return 0;
}

